<template>
  <div>
    <el-tooltip effect="dark" :content="$t('搜索菜单')" placement="bottom">
      <SvgIcon name="search" @click="handleOpen" />
    </el-tooltip>
    <SearchModal v-model="modalVisible" />
  </div>
</template>

<script setup>
import { ref } from 'vue'
import SearchModal from './SearchModal.vue'
import { $t } from '@/languages/index'
/** 控制 modal 显隐 */
const modalVisible = ref(false)
/** 打开 modal */
const handleOpen = () => {
  modalVisible.value = true
}
</script>

<style lang="scss" scoped>
.svg-icon {
  font-size: 20px;
  &:focus {
    outline: none;
  }
}
</style>
